package com.agree.util.excel.enums;

import java.util.Arrays;

/**
 * Created by wangmu on 2017/12/5.
 */
public enum MappingConfig {

    NULL("NULL","NULL","定义一个空值","NULL"),

    TB_UCC_CISUNITCUSTINFO_ADD("UCCCIS0001","CIS065","对公客户信息新增","CIS"),
    TB_UCC_CISUNITCUSTINFO_DELETE("UCCCIS0002","CIS066","对公客户信息删除","CIS"),
    TB_UCC_CISUNITCUSTINFO_UPDATE("UCCCIS0003","CIS067","对公客户信息修改","CIS"),
    TB_UCC_CISUNITCUSTINFO_QUERY("UCCCIS0004","CIS100","对公客户信息查询","CIS"),

    TB_UCC_CISCUPSVINFO_ADD("UCCCIS0033","CIS101","客户合并信息表新增","CIS"),
    TB_UCC_CISCUPSVINFO_DELETE("UCCCIS0034","CIS102","客户合并信息表删除","CIS"),
    TB_UCC_CISCUPSVINFO_UPDATE("UCCCIS0035","CIS103","客户合并信息表修改","CIS"),
    TB_UCC_CISCUPSVINFO_QUERY("UCCCIS0036","CIS104","客户合并信息表查询","CIS"),

    TB_UCC_CISCUPSVASSBUSIDTL_ADD("UCCCIS0053","CIS105","客户号合并关联业务明细新增","CIS"),
    TB_UCC_CISCUPSVASSBUSIDTL_DELETE("UCCCIS0054","CIS106","客户号合并关联业务明细删除","CIS"),
    TB_UCC_CISCUPSVASSBUSIDTL_UPDATE("UCCCIS0055","CIS107","客户号合并关联业务明细修改","CIS"),
    TB_UCC_CISCUPSVASSBUSIDTL_QUERY("UCCCIS0056","CIS108","客户号合并关联业务明细查询","CIS"),

    TB_UCC_CISCUBUSICAGINFO_ADD("UCCCIS0073","CIS109","客户业务往来信息新增","CIS"),
    TB_UCC_CISCUBUSICAGINFO_DELETE("UCCCIS0074","CIS110","客户业务往来信息删除","CIS"),
    TB_UCC_CISCUBUSICAGINFO_UPDATE("UCCCIS0075","CIS111","客户业务往来信息修改","CIS"),
    TB_UCC_CISCUBUSICAGINFO_QUERY("UCCCIS0076","CIS112","客户业务往来信息查询","CIS"),

    TB_UCC_CISCUSTSIGNINFO_ADD("UCCCIS0093","CIS113","客户签约信息新增","CIS"),
    TB_UCC_CISCUSTSIGNINFO_DELETE("UCCCIS0094","CIS114","客户签约信息删除","CIS"),
    TB_UCC_CISCUSTSIGNINFO_UPDATE("UCCCIS0095","CIS115","客户签约信息修改","CIS"),
    TB_UCC_CISCUSTSIGNINFO_QUERY("UCCCIS0096","CIS116","客户签约信息查询","CIS"),

    TB_UCC_PUBCUPSVPARM_ADD("UCCPUB0009","PUB021","客户合并参数新增","CIS"),
    TB_UCC_PUBCUPSVPARM_DELETE("UCCPUB0010","PUB022","客户合并参数删除","CIS"),
    TB_UCC_PUBCUPSVPARM_UPDATE("UCCPUB0011","PUB023","客户合并参数修改","CIS"),
    TB_UCC_PUBCUPSVPARM_QUERY("UCCPUB0012","PUB024","客户合并参数查询","CIS"),

    TB_UCC_PUBCURELTYPPARM_ADD("UCCPUB0005","PUB017","客户关系类型参数新增","CIS"),
    TB_UCC_PUBCURELTYPPARM_DELETE("UCCPUB0006","PUB018","客户关系类型参数删除","CIS"),
    TB_UCC_PUBCURELTYPPARM_UPDATE("UCCPUB0007","PUB019","客户关系类型参数修改","CIS"),
    TB_UCC_PUBCURELTYPPARM_QUERY("UCCPUB0008","PUB020","客户关系类型参数查询","CIS"),

    TB_UCC_PUBCUSTIDPARM_ADD("UCCPUB0001","PUB013","客户证件参数新增","CIS"),
    TB_UCC_PUBCUSTIDPARM_DELETE("UCCPUB0002","PUB014","客户证件参数删除","CIS"),
    TB_UCC_PUBCUSTIDPARM_UPDATE("UCCPUB0003","PUB015","客户证件参数修改","CIS"),
    TB_UCC_PUBCUSTIDPARM_QUERY("UCCPUB0004","PUB016","客户证件参数查询","CIS"),

    TB_UCC_STSCUSTNUMTRENDMONREP_QUERY("UCCSTS0006","STS006","客户数量发展趋势分析月报表-日期查询","CIS"),
    TB_UCC_STSEBANKREP_QUERY("UCCSTS0007","STS007","电子银行业务报表-日期查询","CIS"),
    TB_UCC_STSHIGENDCUSTSTSREP_QUERY("UCCSTS0008","STS008","中高端客户现状分布报表-日期查询","CIS"),
    TB_UCC_STSFULLCUSTREP_QUERY("UCCSTS0009","STS009","全量客户报表-日期查询","CIS"),

    TB_TEMP_DSPUNITBASICACCT_QUERY("TEMP0023","TEMP0023","对公客户基本户/一般户介质信息按账号查询","CIS"),
    TB_TEMP_DPSUNITFIXACCT_QUERY("TEMP0024","TEMP0024","对公客户定期账户信息按账号查询","CIS"),
    TB_TEMP_DPSUNITCERTACCT_QUERY("TEMP0025","TEMP0025","对公客户定期存单介质信息按账号查询","CIS"),
    TB_TEMP_DPSACCOUNTSBLACKLIST_QUERY("TEMP0027","TEMP0027","对公客户账户黑灰名单信息查询","CIS"),
    ;

    private final String tranCode;

    private final String mappingCode;
    private final String comment;

    private final String mappingCodePrefix;

    MappingConfig(String tranCode, String mappingCode, String comment,String mappingCodePrefix) {
        this.tranCode = tranCode;
        this.mappingCode = mappingCode;
        this.comment = comment;
        this.mappingCodePrefix = mappingCodePrefix;
    }

    public String getTranCode() {
        return tranCode;
    }

    public String getMappingCode() {
        return mappingCode;
    }

    public String getComment() {
        return comment;
    }

    public String getMappingCodePrefix() {
        return mappingCodePrefix;
    }

    public static MappingConfig valueOfNoException(String name) {
        return Arrays.stream(MappingConfig.class.getEnumConstants())
                .filter(t -> t.name().equals(name))
                .findFirst()
                .orElseGet(() -> NULL);
    }

}
